﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WqLunTan.Extensions;
using WqLunTan.Models.DataBase;

namespace WqLunTan.Reply
{
    /// <summary>
    /// 回复后台预先设置好的消息
    /// </summary>
    public class MessageReply : IReply
    {
        public string reply(wechat_data data)
        {
            return $"<xml><ToUserName><![CDATA[{data.FromUserName}]]></ToUserName><FromUserName><![CDATA[{data.ToUserName}]]></FromUserName><CreateTime>{DateTimeOffset.UtcNow.ToUnixLong()}</CreateTime><MsgType><![CDATA[{MsgType.text.ToString()}]]></MsgType><Content><![CDATA[{data.Content}]]></Content></xml>";
        }
    }
}
